<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>闪烁效果</title>
    <style>
         @keyframes blink-1 {
            50% {
                color: transparent
            }
        }
        @keyframes blink-2 {
            to {
                color: transparent
            }
        }
        p {
            padding: 1em;
            background: gold;
        }
        .blink-smooth-1 {
            /*3表示三个循环周期*/
            animation: 1s blink-1 3;
        }
        .blink-smooth-2 {
            animation: .5s blink-2 6;
            /*反转每一个循环周期（reverse）或者第偶数个循环周期（alternate）*/
            animation-direction: alternate;
        }
        .blink {
            animation: 1s blink-1 3 steps(1);
        }
    </style>
</head>
<body>
    <p class="blink-smooth-1">Peek-a-boo!</p>
    <p class="blink-smooth-2">Peek-a-boo!</p>
    <p class="blink">Peek-a-boo!</p>
</body>
</html>